//
//  DataSave.m
//  HGMMT
//
//  Created by huan liu on 2018/12/26.
//  Copyright © 2018年 eport_user1. All rights reserved.
//

#import "DataSave.h"

static DataSave *instance = nil;

@interface  DataSave()
@property(nonatomic,strong)UserModel *model;
@end

@implementation DataSave


//创建一个单利
+ (DataSave *)shareInstance{
    
    @synchronized (self) {
        
        if (instance == nil) {
            
            instance = [[DataSave alloc]init];
        }
        
        return instance;
    }
}


- (void)saveUserInfo:(UserModel *)user{
    
    if (self.model != user) {
        self.model = user;
    }
   
    
}
- (UserModel *)getUserInfo{

    return self.model;
    
}





@end
